﻿@model VietPremier.Models.GetStyleModel
@{
    if (Model != null)
    {
        ViewBag.Title = Model.travelCity.Titletag;
        ViewBag.Description = Model.travelCity.Meta_description;
        ViewBag.Keywords = Model.travelCity.Meta_keyword;
    }
}

@helper Truncate(string input, int length)
{
    if (input.Length <= length)
    { 
    @Html.Raw(input)
    }
    else
    { 
    @Html.Raw(input.Substring(0, length))<text>...</text>
    }
}

<script type="text/javascript">
    jQuery(document).ready(function () {
        checkStart();
    });

    function checkStart() {
        $("#li-itinerary").addClass("active");
        $("#itinerary").addClass("tab-pane scroll-pane active");
    }

    function tab_PriceBooking() {
        $("#li-price-booking").addClass("active");
        $("#price-booking").addClass("tab-pane scroll-pane active");

        $("#li-itinerary").removeClass("active");
        $("#itinerary").removeClass();
        $("#itinerary").addClass("tab-pane scroll-pane");
        return false;
    }

    function tab_Itinerary() {
        $("#li-itinerary").addClass("active");
        $("#itinerary").addClass("tab-pane scroll-pane active");

        $("#li-price-booking").removeClass("active");
        $("#price-booking").removeClass();
        $("#price-booking").addClass("tab-pane scroll-pane");
        return false;
    }

</script>

@{
    if (!string.IsNullOrEmpty(TempData["ContactUs"] as string))
    {
        var getInfo = TempData["ContactUs"].ToString();
        
    <script type="text/javascript">
        jQuery(document).ready(function () {
            checkSubmit();
        });
        function checkSubmit() {
            msg = '@getInfo';
            if (msg == "Error") {
                $("#li-price-booking").addClass("active");
                $("#price-booking").addClass("tab-pane scroll-pane active");

                $("#li-itinerary").removeClass("active");
                $("#itinerary").removeClass();
                $("#itinerary").addClass("tab-pane scroll-pane");
                return false;
            } else {
            }
        }
    </script>
    }
}

@{
    if (!string.IsNullOrEmpty(TempData["Message"] as string))
    {
        var getInfo = TempData["Message"].ToString();
        
    <script type="text/javascript">
        jQuery(document).ready(function () {
            checkSubmit();
        });
        function checkSubmit() {
            msg = '@getInfo';
            if (msg == "ErrorMessage") {
                alert("Lỗi server, không thể gửi email. Vui lòng liên hệ trực tiếp với chúng tôi!")
                $("#li-price-booking").addClass("active");
                $("#price-booking").addClass("tab-pane scroll-pane active");

                $("#li-itinerary").removeClass("active");
                $("#itinerary").removeClass();
                $("#itinerary").addClass("tab-pane scroll-pane");
                return false;
            } else {
                alert("Nội dung của bạn đã được gửi tới email của chúng tôi!")
                $("#li-price-booking").addClass("active");
                $("#price-booking").addClass("tab-pane scroll-pane active");

                $("#li-itinerary").removeClass("active");
                $("#itinerary").removeClass();
                $("#itinerary").addClass("tab-pane scroll-pane");
                return false;
            }
        }
    </script>
    }
}


<div class="row-fluid">
    <div class="span3">
        @Html.Action("LeftMenu", "Home")
        @Html.Action("Onlinesupport", "Home")
        @*@Html.Action("Spotlight", "Home")*@
        @Html.Action("News_Event", "Home")
    </div>
    <!--/ .span3-->
    <div class="span9">
        <div class="link-page">
            <a href="@Url.Action("Index", "Home")">Trang chủ&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")" />&nbsp;</a>
            <a href="#">Phong cách du lịch&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")" />&nbsp;</a>
            <a href="@Url.Action("TravelStyle", "Style", new { title = Utilities.Encode(Model.style.Name) })">@Model.style.Name&nbsp;<img src="@Url.Content("~/Content/cssFrontEnd/images/iconmt.png")" />&nbsp;</a>
            <span>@Model.travelCity.Name</span>
        </div>
        <div class="box-about">
            <h1 class="title">@Model.travelCity.Name</h1>
            <div class="wheretosay none">
                <div class="it">
                    <div class="like_share">
                        <a href="#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href), 'facebook-share-dialog', 'width=626,height=436');  return false;">
                            <img src="@Url.Content("~/Content/cssFrontEnd/images/facebook.jpg")" /></a>
                        <a href="#" onclick="window.open('https://plus.google.com/share?url='+encodeURIComponent(location.href),'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;">
                            <img src="@Url.Content("~/Content/cssFrontEnd/images/Google.jpg")" /></a>
                        <a href="#">
                            <img src="@Url.Content("~/Content/cssFrontEnd/images/Twitter.jpg")" /></a>
                    </div>
                    <small class="price">Giá: @Model.travelCity.Price</small>
                    @*<small class="tripcode">Mã: @Model.travelCity.TripCode</small>*@
                    <small class="tripcode">Thời gian: @Model.travelCity.Time</small>
                    <small class="journey">@Model.travelCity.Duration</small>
                </div>
                <!--/ .it-->
            </div>
            <div id="products">
                <div class="slides_container">
                    <a href="" rel="lightbox">
                        <img src="" alt=""></a>
                </div>
                <ul class="pagination">
                    <li><a href="#">
                        <img src="" width="85" alt=""></a></li>
                </ul>
            </div>
            <h5>Thông tin chi tiết</h5>
            @Html.Raw(Model.travelCity.Description)
            <ul class="nav nav-tabs destination">
                <li id="li-itinerary"><a href="#itinerary" onclick="tab_Itinerary()" data-toggle="tab">Itinerary</a></li>
                <li id="li-price-booking"><a href="#price-booking" onclick="tab_PriceBooking()" data-toggle="tab">Price & Booking</a></li>
            </ul>
            <div class="tab-content">
                <div class="tab-pane scroll-pane" id="itinerary">
                    @Html.Raw(Model.travelCity.Itinerary)
                </div>
                <div class="tab-pane scroll-pane" id="price-booking">
                    <h5>Quy định:</h5>
                    @Html.Raw(Model.travelCity.Note)
                    <h5>Liên hệ:</h5>

                    @using (Html.BeginForm("TravelDetail", "Style", new { city = Utilities.Encode(Model.travelCity.Name), title = Utilities.Encode(Model.style.Name)  }, FormMethod.Post, new { enctype = "multipart/form-data" }))
                    {
                        <div class="form">
                            <div class="row">
                                <div class="label">Đơn vị/ Doanh nghiệp</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.Supplier, new { @class = "input-xlarge" })
                                    @Html.ValidationMessageFor(model => model.Supplier)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Người liên hệ</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.FullName, new { @class = "input-xlarge" })
                                    @Html.ValidationMessageFor(model => model.FullName)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Giới tính</div>
                                <div class="textbox">
                                    <label class="radio inline">
                                        @Html.RadioButton("Gender", "Ông.", true)
                                        Nam
                                    </label>
                                    <label class="radio inline">
                                        @Html.RadioButton("Gender", "Bà.", false)
                                        Nữ
                                    </label>
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Điện thoại</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.Telephone)
                                    @Html.ValidationMessageFor(model => model.Telephone)
                                    <p>
                                        <i>Please send us your mobile or land phone coundtry/area code and number at home and work in case we need to ring you to discuss and requirements or if problem with email correspondance occrus.(*)
                                        </i>
                                    </p>
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Email</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.Email)
                                    @Html.ValidationMessageFor(model => model.Email)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Quốc tịch</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.Nationality)
                                    @Html.ValidationMessageFor(model => model.Nationality)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Nơi đến</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.Destination)
                                    @Html.ValidationMessageFor(model => model.Destination)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Chuẩn khách sạn</div>
                                <div class="textbox">
                                    @*@Html.DropDownList("Place", Model.category as SelectList, "--Select a standard--", new { id = "idPlace", @class = "select" })
                                    @Html.ValidationMessageFor(model => model.Place)*@
                                    @Html.DropDownListFor(model => model.Place, new List<SelectListItem>{
                                                               new SelectListItem(){Text="Luxury",Value="Luxury"},
                                                               new SelectListItem(){Text="First Class",Value="First Class"},
                                                               new SelectListItem(){Text="Deluxe",Value="Deluxe"},
                                                               new SelectListItem(){Text="Superior",Value="Superior"},
                                                               new SelectListItem(){Text="Mid-range",Value="Mid-range"}})
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Ngày đi</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.DateFrom, new { placeholder = "dd/mm/yy", @class = "date", id = "date-from" })
                                    @Html.ValidationMessageFor(model => model.DateFrom)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Ngày về</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.DateTo, new { placeholder = "dd/mm/yy", @class = "date", id = "date-to" })
                                    @Html.ValidationMessageFor(model => model.DateTo)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Số lượng người lớn</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.NumberofAdults)
                                    @Html.ValidationMessageFor(model => model.NumberofAdults)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Số lượng trẻ em</div>
                                <div class="textbox">
                                    @Html.TextBoxFor(model => model.NumberofChildren)
                                    @Html.ValidationMessageFor(model => model.NumberofChildren)
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="label">Yêu cầu đặc biệt khác</div>
                                <div class="textbox">
                                    @Html.TextAreaFor(model => model.SpecialRequest, new { @class = "input-xlarge", @rows = 4 })
                                </div>
                                <div class="clear"></div>
                            </div>
                            <div class="row">
                                <div class="textbox">
                                    <button name="btnSend" type="submit" class="btn btn-large btn-submit">Gửi</button>
                                </div>
                                <div class="clear"></div>
                            </div>
                        </div>
                    }
                </div>
                <!--/ .tab-pane-->
            </div>
            <!--/ .tab-content-->
            <ul class="nav nav-tabs destination none">
                <li class="active"><a href="#itinerary" data-toggle="tab">@Model.style.Name</a></li>
            </ul>
            <div class="tab-content none">
                <div class="tab-pane active" id="Itinerary">
                    <div class="span12 wheretosay">
                        @{
                            foreach (var item in Model.listTravelCity)
                            {
                                var imageFile = string.Concat("~/Content/upload/travelcity/", item.Image);
                            <div class="it">
                                <div class="img">
                                    <div class="img-inner">
                                        <a href="@Url.Action("TravelDetail", "Style", new { city = Utilities.Encode(item.Name), title = Utilities.Encode(Model.style.Name) })">
                                            <img src="@Url.Content(imageFile)" style="width:150px; height:88px" alt=""></a>
                                    </div>
                                </div>
                                <h4><a class="title" href="@Url.Action("TravelDetail", "Style", new { city = Utilities.Encode(item.Name), title = Utilities.Encode(Model.style.Name) })">@item.Name</a></h4>
                                <small class="price">Giá: @item.Price</small>
                                @*<small class="tripcode">Mã: @item.TripCode</small>*@
                                <small class="tripcode">Thời gian: @item.Time</small>
                                <small class="journey">@item.Duration</small>
                            </div>
                            <!--/ .it-->
                            }
                        }

                    </div>
                </div>
            </div>
        </div>
        <!--/ .box-about-->
    </div>
    <!--/ .span9-->
</div>
<!--/ .row-fluid-->


